package [path_1].[path_2].entity;

import lombok.*;
import java.io.Serializable;

/**
 * @author hzg
 * @date 2020/2/16
 */
@Setter
public class PageRequestDto implements Serializable{

    protected Integer size;
    protected Integer page;

    public Integer getSize() {
        if (this.size == null || this.size < 0 || this.size > 50){
            setSize(10);
        }
        return size;
    }

    public Integer getPage() {
        if (this.page == null || this.page < 0) {
            setPage(1);
        }
        return page;
    }
}
